Warning: mkdir(): No space left on device in /var/www/tg-me/post.php on line 37

Warning: file_put_contents(aCache/aDaily/post/vuejs_ru/--): Failed to open stream: No such file or directory in /var/www/tg-me/post.php on line 50
Александр www in Vue.js — русскоговорящее сообщество | Telegram Webview: vuejs_ru/1610778 -
Telegram Group & Telegram Channel
Всем привет, подскажите как 2 роутера использовать во Vue:

import router from './routes';
import adminRouter from './admin/routes';

createApp(App)
.use(router)
.use(adminRouter);


admin/router/index.js:
import { createRouter, createWebHistory } from 'vue-router';
import AdminLayout from "../layouts/AdminLayout.vue";
import Orders from '../pages/Orders.vue';

const routes = [
{ path: '/', component: AdminLayout, children: [
{ path: '/orders', name: 'AdminOrders', component: Orders, meta: {title: 'Заявки'} },
]
},
];

const adminRouter = createRouter({
history: createWebHistory('/admin'),
routes,
});

export default adminRouter;


routes/index.js:
import { createRouter, createWebHistory } from 'vue-router';
import AppLayout from "../layouts/AppLayout.vue";
import Main from '../pages/Main.vue';

const routes = [
{ path: '/', component: AppLayout, children: [
{ path: '/', name: 'Main', component: Main, meta: {title: 'Главная'} },
]
},
];

export default router;


Так вообще можно делать?? В консоли всякие ошибки



tg-me.com/vuejs_ru/1610778
Create:
Last Update:

Всем привет, подскажите как 2 роутера использовать во Vue:

import router from './routes';
import adminRouter from './admin/routes';

createApp(App)
.use(router)
.use(adminRouter);


admin/router/index.js:
import { createRouter, createWebHistory } from 'vue-router';
import AdminLayout from "../layouts/AdminLayout.vue";
import Orders from '../pages/Orders.vue';

const routes = [
{ path: '/', component: AdminLayout, children: [
{ path: '/orders', name: 'AdminOrders', component: Orders, meta: {title: 'Заявки'} },
]
},
];

const adminRouter = createRouter({
history: createWebHistory('/admin'),
routes,
});

export default adminRouter;


routes/index.js:
import { createRouter, createWebHistory } from 'vue-router';
import AppLayout from "../layouts/AppLayout.vue";
import Main from '../pages/Main.vue';

const routes = [
{ path: '/', component: AppLayout, children: [
{ path: '/', name: 'Main', component: Main, meta: {title: 'Главная'} },
]
},
];

export default router;


Так вообще можно делать?? В консоли всякие ошибки

BY Александр www in Vue.js — русскоговорящее сообщество


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/vuejs_ru/1610778

View MORE
Open in Telegram


Vue js — русскоговорящее сообщество Telegram | DID YOU KNOW?

Date: |

Telegram announces Anonymous Admins

The cloud-based messaging platform is also adding Anonymous Group Admins feature. As per Telegram, this feature is being introduced for safer protests. As per the Telegram blog post, users can “Toggle Remain Anonymous in Admin rights to enable Batman mode. The anonymized admin will be hidden in the list of group members, and their messages in the chat will be signed with the group name, similar to channel posts.”

What Is Bitcoin?

Bitcoin is a decentralized digital currency that you can buy, sell and exchange directly, without an intermediary like a bank. Bitcoin’s creator, Satoshi Nakamoto, originally described the need for “an electronic payment system based on cryptographic proof instead of trust.” Each and every Bitcoin transaction that’s ever been made exists on a public ledger accessible to everyone, making transactions hard to reverse and difficult to fake. That’s by design: Core to their decentralized nature, Bitcoins aren’t backed by the government or any issuing institution, and there’s nothing to guarantee their value besides the proof baked in the heart of the system. “The reason why it’s worth money is simply because we, as people, decided it has value—same as gold,” says Anton Mozgovoy, co-founder & CEO of digital financial service company Holyheld.

Vue js — русскоговорящее сообщество from ye


Telegram Александр www in Vue.js — русскоговорящее сообщество
FROM USA